500
|
How can I filter items for dates before a specified date
![](images/extreeq500.png)
with Tree1 do
begin
BeginUpdate();
with (IUnknown(Columns.Add('Dates')) as EXTREELib_TLB.Column) do
begin
SortType := EXTREELib_TLB.SortDate;
DisplayFilterButton := True;
DisplayFilterPattern := True;
DisplayFilterDate := True;
FilterList := Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exNoItems);
Filter := 'to 12/27/2010';
FilterType := EXTREELib_TLB.exDate;
end;
with Items do
begin
AddItem('12/27/2010');
AddItem('12/28/2010');
AddItem('12/29/2010');
AddItem('12/30/2010');
AddItem('12/31/2010');
end;
ApplyFilter();
EndUpdate();
end
|
499
|
Is it possible to filter dates
![](images/extreeq499.png)
with Tree1 do
begin
BeginUpdate();
with (IUnknown(Columns.Add('Dates')) as EXTREELib_TLB.Column) do
begin
SortType := EXTREELib_TLB.SortDate;
DisplayFilterButton := True;
DisplayFilterPattern := True;
DisplayFilterDate := True;
FilterList := Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exNoItems);
end;
with Items do
begin
AddItem('12/27/2010');
AddItem('12/28/2010');
AddItem('12/29/2010');
AddItem('12/30/2010');
AddItem('12/31/2010');
end;
EndUpdate();
end
|
498
|
Is it possible to change the Exclude field name to something different, in the drop down filter window
![](images/extreeq498.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Description[EXTREELib_TLB.exFilterBarExclude] := 'Leaving out';
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
end;
EndUpdate();
end
|
497
|
How can I display the Exclude field in the drop down filter window
![](images/extreeq497.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXTREELib_TLB.exShowExclude) Or Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
end;
EndUpdate();
end
|
496
|
Is it possible to show and ensure the focused item from the control, in the drop down filter window
![](images/extreeq496.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXTREELib_TLB.exShowFocusItem) Or Integer(EXTREELib_TLB.exShowCheckBox);
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
SelectItem[InsertItem(h,Null,'Child 2')] := True;
ExpandItem[h] := True;
end;
EndUpdate();
end
|
495
|
Is it possible to show only blanks items with no listed items from the control
![](images/extreeq495.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXTREELib_TLB.exShowBlanks) Or Integer(EXTREELib_TLB.exNoItems);
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
EndUpdate();
end
|
494
|
How can I include the blanks items in the drop down filter window
![](images/extreeq494.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := Integer(EXTREELib_TLB.exShowBlanks) Or Integer(EXTREELib_TLB.exShowCheckBox);
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
EndUpdate();
end
|
493
|
How can I select multiple items in the drop down filter window, using check-boxes
![](images/extreeq493.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := EXTREELib_TLB.exShowCheckBox;
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
EndUpdate();
end
|
492
|
Is it possible to allow a single item being selected in the drop down filter window
![](images/extreeq492.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := False;
FilterList := EXTREELib_TLB.exSingleSel;
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
EndUpdate();
end
|
491
|
How can I display no (All) item in the drop down filter window
![](images/extreeq491.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Description[EXTREELib_TLB.exFilterBarAll] := '';
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := True;
FilterList := EXTREELib_TLB.exNoItems;
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
EndUpdate();
end
|
490
|
Is it possible to display no items in the drop down filter window, so only the pattern is visible
![](images/extreeq490.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Items')) as EXTREELib_TLB.Column) do
begin
DisplayFilterButton := True;
DisplayFilterPattern := True;
FilterList := EXTREELib_TLB.exNoItems;
end;
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
EndUpdate();
end
|
489
|
How do I hide the selection
![](images/extreeq489.png)
with Tree1 do
begin
BeginUpdate();
MarkSearchColumn := False;
SelForeColor := ForeColor;
SelBackColor := BackColor;
ShowFocusRect := False;
with Columns do
begin
with (IUnknown(Add('Format')) as EXTREELib_TLB.Column) do
begin
FormatColumn := 'type(value) in (0,1) ? ''null'' : ( dbl(value)<0 ? ''<fgcolor=FF0000>''+ (value format ''2|.|3|,|1'' ) : (dbl(value)>0 ? ''<fgcolor=000' +
'0FF>+''+(value format ''2|.|3|,'' ): ''0.00'') )';
Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
end;
end;
with Items do
begin
AddItem(OleVariant(10));
AddItem(OleVariant(-8));
end;
EndUpdate();
end
|
488
|
How do I access the cells, or how do I get the values in the columns
with Tree1 do
begin
with Columns do
begin
Add('C1');
Add('C2');
Add('C3');
end;
with Items do
begin
h := AddItem('Item 1');
CellCaption[OleVariant(h),OleVariant(1)] := 'SubItem 1.1';
CellCaption[OleVariant(h),OleVariant(2)] := 'SubItem 1.2';
OutputDebugString( CellCaption[OleVariant(h),OleVariant(0)] );
end;
end
|
487
|
Is it possible to load child items when clicking the +/- button
![](images/extreeq487.png)
// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
procedure TForm1.Tree1BeforeExpandItem(ASender: TObject; Item : HITEM;var Cancel : OleVariant);
begin
with Tree1 do
begin
with Items do
begin
InsertItem(Item,Null,'new');
ItemHasChildren[InsertItem(Item,Null,'new')] := True;
InsertItem(Item,Null,'new');
end;
end
end;
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Default');
with Items do
begin
ItemHasChildren[AddItem('aka')] := True;
AddItem('next item');
end;
end
|
486
|
How can I change the check-boxes appearance
![](images/extreeq486.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('Default')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
PartialCheck := True;
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
with VisualAppearance do
begin
Add(1,'XP:Button 3 12');
Add(2,'XP:Button 3 11');
Add(3,'XP:Button 3 10');
end;
CheckImage[EXTREELib_TLB.Unchecked] := 16777216;
CheckImage[EXTREELib_TLB.Checked] := 33554432;
CheckImage[EXTREELib_TLB.PartialChecked] := 50331648;
end
|
485
|
How can I initiate the OLE Drag and Drop support
![](images/extreeq485.png)
// OLEStartDrag event - Occurs when the OLEDrag method is called.
procedure TForm1.Tree1OLEStartDrag(ASender: TObject; Data : IExDataObject;var AllowedEffects : Integer);
begin
// Data.SetData("data to drag")
with Tree1 do
begin
AllowedEffects := 1;
end
end;
with Tree1 do
begin
OLEDropMode := EXTREELib_TLB.exOLEDropManual;
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
end
|
484
|
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)
![](images/extreeq484.png)
with Tree1 do
begin
BeginUpdate();
with ConditionalFormats.Add('1','K1') do
begin
BackColor := $ff;
ApplyTo := EXTREELib_TLB.FormatApplyToEnum($1);
end;
with ConditionalFormats.Add('1','K2') do
begin
BackColor := $ff;
ApplyTo := EXTREELib_TLB.FormatApplyToEnum($2);
end;
MarkSearchColumn := False;
DrawGridLines := EXTREELib_TLB.exRowLines;
with Columns do
begin
Add('Column 1');
Add('Column 2');
Add('Column 3');
end;
with Items do
begin
AddItem(Null);
AddItem(Null);
AddItem(Null);
end;
EndUpdate();
end
|
483
|
Is it possible to display empty strings for 0 values
![](images/extreeq483.png)
with Tree1 do
begin
(IUnknown(Columns.Add('Currency')) as EXTREELib_TLB.Column).FormatColumn := 'dbl(value) ? currency(dbl(value)) : ``';
with Items do
begin
AddItem(OleVariant(1.23));
AddItem(OleVariant(2.34));
AddItem(OleVariant(0));
AddItem(OleVariant(10000.99));
end;
end
|
482
|
Is it possible to display empty strings for 0 values
![](images/extreeq482.png)
with Tree1 do
begin
Columns.Add('Number');
(IUnknown(Columns.Add('Currency')) as EXTREELib_TLB.Column).ComputedField := '%0 ? currency(%0) : ``';
with Items do
begin
AddItem(OleVariant(1.23));
AddItem(OleVariant(2.34));
AddItem(OleVariant(0));
AddItem(OleVariant(10000.99));
end;
end
|
481
|
How can I get the list of items as they are displayed
with Tree1 do
begin
BeginUpdate();
BackColorAlternate := RGB(240,240,240);
Columns.Add('Names');
with Items do
begin
AddItem('Mantel');
AddItem('Mechanik');
AddItem('Motor');
AddItem('Murks');
AddItem('Märchen');
AddItem('Möhren');
AddItem('Mühle');
end;
Columns.Item[OleVariant(0)].SortOrder := EXTREELib_TLB.SortAscending;
EndUpdate();
OutputDebugString( GetItems(OleVariant(1)) );
end
|
480
|
Is posible to reduce the size of the picture to be shown in the column's caption
![](images/extreeq480.png)
with Tree1 do
begin
BeginUpdate();
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HeaderHeight := 48;
(IUnknown(Columns.Add('DefaultSize')) as EXTREELib_TLB.Column).HTMLCaption := 'Default-Size <img>pic1</img> Picture';
(IUnknown(Columns.Add('CustomSize')) as EXTREELib_TLB.Column).HTMLCaption := 'Custom-Size <img>pic1:16</img> Picture';
EndUpdate();
end
|
479
|
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
![](images/extreeq479.png)
with Tree1 do
begin
BeginUpdate();
MarkSearchColumn := False;
with ConditionalFormats.Add('1',Null) do
begin
Bold := True;
ForeColor := $ff;
ApplyTo := EXTREELib_TLB.FormatApplyToEnum($1);
end;
Columns.Add('C1');
with (IUnknown(Columns.Add('C2')) as EXTREELib_TLB.Column) do
begin
HeaderBold := True;
HTMLCaption := '<fgcolor=FF0000>C2';
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(10))),OleVariant(1)] := OleVariant(11);
CellCaption[OleVariant(AddItem(OleVariant(12))),OleVariant(1)] := OleVariant(13);
end;
EndUpdate();
end
|
478
|
The item is not getting selected when clicking the cell's checkbox. What should I do
![](images/extreeq478.png)
// CellStateChanged event - Fired after cell's state has been changed.
procedure TForm1.Tree1CellStateChanged(ASender: TObject; Item : HITEM;ColIndex : Integer);
begin
with Tree1 do
begin
Items.SelectItem[Item] := True;
end
end;
with Tree1 do
begin
(IUnknown(Columns.Add('Check')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
with Items do
begin
AddItem(OleVariant(0));
AddItem(OleVariant(1));
AddItem(OleVariant(2));
AddItem(OleVariant(3));
end;
end
|
477
|
Is it possible to limit the height of the item while resizing
![](images/extreeq477.png)
// AddItem event - Occurs after a new Item has been inserted to Items collection.
procedure TForm1.Tree1AddItem(ASender: TObject; Item : HITEM);
begin
with Tree1 do
begin
Items.ItemMinHeight[Item] := 18;
Items.ItemMaxHeight[Item] := 72;
end
end;
with Tree1 do
begin
BeginUpdate();
ItemsAllowSizing := EXTREELib_TLB.exResizeItem;
ScrollBySingleLine := False;
BackColorAlternate := RGB(240,240,240);
Columns.Add('Names');
with Items do
begin
AddItem('Mantel');
AddItem('Mechanik');
AddItem('Motor');
AddItem('Murks');
AddItem('Märchen');
AddItem('Möhren');
AddItem('Mühle');
end;
Columns.Item[OleVariant(0)].SortOrder := EXTREELib_TLB.SortAscending;
EndUpdate();
end
|
476
|
Is it possible to copy the hierarchy of the control using the GetItems method
![](images/extreeq476.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Def');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
end;
PutItems(GetItems(OleVariant(-1)),Null);
end
|
475
|
How can I show the child items with no identation
![](images/extreeq475.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exGroupLinesOutside;
Indent := 12;
HasLines := EXTREELib_TLB.exThinLine;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
end;
end
|
474
|
Is there other ways of showing the hierarchy lines (exGroupLinesAtRoot)
![](images/extreeq474.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exGroupLinesAtRoot;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
473
|
Is there other ways of showing the hierarchy lines (exGroupLinesOutside)
![](images/extreeq473.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exGroupLinesOutside;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
end;
end
|
472
|
Is there other ways of showing the hierarchy lines (exGroupLinesInsideLeaf)
![](images/extreeq472.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exGroupLinesInsideLeaf;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
471
|
Is there other ways of showing the hierarchy lines (exGroupLinesInside)
![](images/extreeq471.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exGroupLinesInside;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
470
|
Is there other ways of showing the hierarchy lines (exGroupLines)
![](images/extreeq470.png)
with Tree1 do
begin
LinesAtRoot := EXTREELib_TLB.exGroupLines;
Indent := 12;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(InsertItem(h,Null,'Child 2'),Null,'SubChild 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
469
|
Does your control supports multiple lines tooltip
![](images/extreeq469.png)
with Tree1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
ToolTipDelay := 1;
(IUnknown(Columns.Add('tootip')) as EXTREELib_TLB.Column).ToolTip := '<br><font Tahoma;10>This</font> is a <b>multi-lines</b> tooltip assigned to a column. The tooltip supports built-in HTML tags, i' +
'cons and pictures.<br><br><br><img>pic1</img> picture ... <br><br>';
end
|
468
|
How can I prevent highlighting the column from the cursor - point
![](images/extreeq468.png)
with Tree1 do
begin
VisualAppearance.Add(1,'gBFLBCJwBAEHhEJAEGg4BI0IQAAYAQGKIYBkAKBQAGaAoDDUOQzQwAAxDKKUEwsACEIrjKCYVgOHYYRrIMYgBCMJhLEoaZLhEZRQiqDYtRDFQBSDDcPw/EaRZohGaYJg' +
'EgI=');
Background[EXTREELib_TLB.exCursorHoverColumn] := $1000000;
(IUnknown(Columns.Add('S')) as EXTREELib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('Level 1')) as EXTREELib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 2')) as EXTREELib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('Level 3')) as EXTREELib_TLB.Column).LevelKey := OleVariant(1);
(IUnknown(Columns.Add('E1')) as EXTREELib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('E2')) as EXTREELib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('E3')) as EXTREELib_TLB.Column).Width := 32;
(IUnknown(Columns.Add('E4')) as EXTREELib_TLB.Column).Width := 32;
end
|
467
|
Is there any option to show the tooltip programmatically
![](images/extreeq467.png)
// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.Tree1MouseMove(ASender: TObject; Button : Smallint;Shift : Smallint;X : Integer;Y : Integer);
begin
with Tree1 do
begin
ShowToolTip(ItemFromPoint[-1,-1,c,hit],'','8','8',Null);
end
end;
with Tree1 do
begin
BeginUpdate();
Columns.Add('Def');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
end;
EndUpdate();
end
|
466
|
Is it possible to prevent changing the rows/items colors by selection
![](images/extreeq466.png)
with Tree1 do
begin
SelBackMode := EXTREELib_TLB.exTransparent;
(IUnknown(Columns.Add('HTML')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
with Items do
begin
AddItem('<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.');
SelectItem[AddItem('<font ;6>This</font> <b>is</b> another <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>.')] := True;
end;
end
|
465
|
Is it possible to specify the cell's value but still want to display some formatted text instead the value
![](images/extreeq465.png)
with Tree1 do
begin
BeginUpdate();
MarkSearchColumn := False;
Columns.Add('Value');
Columns.Add('FormatCell');
with Items do
begin
h := AddItem(OleVariant(1));
CellCaption[OleVariant(h),OleVariant(1)] := OleVariant(12);
FormatCell[OleVariant(h),OleVariant(1)] := 'currency(value)';
h := AddItem('1/1/2001');
CellCaption[OleVariant(h),OleVariant(1)] := '1/1/2001';
CellCaptionFormat[OleVariant(h),OleVariant(1)] := EXTREELib_TLB.exHTML;
FormatCell[OleVariant(h),OleVariant(1)] := 'longdate(value) replace ''2001'' with ''<b>2001</b>''';
end;
EndUpdate();
end
|
464
|
How can I simulate displaying groups
![](images/extreeq464.png)
with Tree1 do
begin
BeginUpdate();
HasLines := EXTREELib_TLB.exNoLine;
ScrollBySingleLine := True;
MarkSearchColumn := False;
with Columns do
begin
Add('Name');
Add('A');
Add('B');
Add('C');
end;
with Items do
begin
h := AddItem('Group 1');
CellHAlignment[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.CenterAlignment;
ItemDivider[h] := 0;
ItemDividerLineAlignment[h] := EXTREELib_TLB.DividerBoth;
ItemHeight[h] := 24;
SortableItem[h] := False;
h1 := InsertItem(h,Null,'Child 1');
CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(1);
CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(2);
CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(3);
h1 := InsertItem(h,Null,'Child 2');
CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(4);
CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(5);
CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(6);
ExpandItem[h] := True;
h := AddItem('Group 2');
CellHAlignment[OleVariant(h),OleVariant(0)] := EXTREELib_TLB.CenterAlignment;
ItemDivider[h] := 0;
ItemDividerLineAlignment[h] := EXTREELib_TLB.DividerBoth;
ItemHeight[h] := 24;
SortableItem[h] := False;
h1 := InsertItem(h,Null,'Child 1');
CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(1);
CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(2);
CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(3);
h1 := InsertItem(h,Null,'Child 2');
CellCaption[OleVariant(h1),OleVariant(1)] := OleVariant(4);
CellCaption[OleVariant(h1),OleVariant(2)] := OleVariant(5);
CellCaption[OleVariant(h1),OleVariant(3)] := OleVariant(6);
ExpandItem[h] := True;
end;
EndUpdate();
end
|
463
|
How can I collapse all items
![](images/extreeq463.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[0] := False;
end;
EndUpdate();
end
|
462
|
How can I expand all items
![](images/extreeq462.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('Root 1');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
h := AddItem('Root 2');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[0] := True;
end;
EndUpdate();
end
|
461
|
Can I use PNG images to display pictures in the control
![](images/extreeq461.png)
with Tree1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\card.png';
HeaderHeight := 48;
(IUnknown(Columns.Add('ColumnName')) as EXTREELib_TLB.Column).HTMLCaption := '<b>HTML</b> Column <img>pic1</img> Picture';
end
|
460
|
Is it possible to move an item from a parent to another
![](images/extreeq460.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
AddItem('A');
AddItem('B');
InsertItem(AddItem('C'),'','D');
SetParent(FindItem['D',OleVariant(0),Null],FindItem['A',OleVariant(0),Null]);
end;
EndUpdate();
end
|
459
|
How can I change the identation for an item
![](images/extreeq459.png)
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
AddItem('A');
AddItem('B');
InsertItem(AddItem('C'),'','D');
SetParent(FindItem['D',OleVariant(0),Null],0);
end;
EndUpdate();
end
|
458
|
How can I filter programatically using more columns
![](images/extreeq458.png)
with Tree1 do
begin
BeginUpdate();
MarkSearchColumn := False;
with Columns do
begin
Add('Car');
Add('Equipment');
end;
with Items do
begin
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag';
CellCaption[OleVariant(AddItem('Toyota')),OleVariant(1)] := 'Air Bag,Air condition';
CellCaption[OleVariant(AddItem('Ford')),OleVariant(1)] := 'Air condition';
CellCaption[OleVariant(AddItem('Nissan')),OleVariant(1)] := 'Air Bag,ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'Air Bag, ABS,ESP';
CellCaption[OleVariant(AddItem('Mazda')),OleVariant(1)] := 'ABS,ESP';
end;
with Columns.Item['Car'] do
begin
FilterType := EXTREELib_TLB.exFilter;
Filter := 'Mazda';
end;
with Columns.Item['Equipment'] do
begin
FilterType := EXTREELib_TLB.exPattern;
Filter := '*ABS*|*ESP*';
end;
ApplyFilter();
EndUpdate();
end
|
457
|
Is it possible to colour a particular column, I mean the cell's foreground color
![](images/extreeq457.png)
with Tree1 do
begin
BeginUpdate();
with ConditionalFormats.Add('1',Null) do
begin
ForeColor := $ff;
ApplyTo := EXTREELib_TLB.FormatApplyToEnum($1);
end;
MarkSearchColumn := False;
with Columns do
begin
Add('Column 1');
Add('Column 2');
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := OleVariant(1);
CellCaption[OleVariant(AddItem(OleVariant(2))),OleVariant(1)] := OleVariant(3);
CellCaption[OleVariant(AddItem(OleVariant(4))),OleVariant(1)] := OleVariant(5);
end;
EndUpdate();
end
|
456
|
Is it possible to colour a particular column for specified values
![](images/extreeq456.png)
with Tree1 do
begin
BeginUpdate();
with ConditionalFormats.Add('int(%1) in (3,4,5)',Null) do
begin
BackColor := $ff;
ApplyTo := EXTREELib_TLB.FormatApplyToEnum($1);
end;
MarkSearchColumn := False;
with Columns do
begin
Add('Column 1');
Add('Column 2');
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := OleVariant(1);
CellCaption[OleVariant(AddItem(OleVariant(2))),OleVariant(1)] := OleVariant(3);
CellCaption[OleVariant(AddItem(OleVariant(4))),OleVariant(1)] := OleVariant(5);
end;
EndUpdate();
end
|
455
|
Is it possible to colour a particular column
![](images/extreeq455.png)
with Tree1 do
begin
BeginUpdate();
MarkSearchColumn := False;
with Columns do
begin
Add('Column 1');
(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellBackColor] := OleVariant(255);
end;
with Items do
begin
CellCaption[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := OleVariant(1);
CellCaption[OleVariant(AddItem(OleVariant(2))),OleVariant(1)] := OleVariant(3);
CellCaption[OleVariant(AddItem(OleVariant(4))),OleVariant(1)] := OleVariant(5);
end;
EndUpdate();
end
|
454
|
How do i get all the children items that are under a certain parent Item handle
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('P');
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
with Items do
begin
hChild := ItemChild[FirstVisibleItem];
OutputDebugString( CellCaption[OleVariant(hChild),OleVariant(0)] );
OutputDebugString( CellCaption[OleVariant(NextSiblingItem[hChild]),OleVariant(0)] );
end;
EndUpdate();
end
|
453
|
How can I get the caption of focused item
// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.Tree1SelectionChanged(ASender: TObject; );
begin
with Tree1 do
begin
with Items do
begin
OutputDebugString( 'Handle' );
OutputDebugString( FocusItem );
OutputDebugString( 'Caption' );
OutputDebugString( CellCaption[OleVariant(FocusItem),OleVariant(0)] );
end;
end
end;
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('R1');
InsertItem(h,Null,'Cell 1.1');
InsertItem(h,Null,'Cell 1.2');
ExpandItem[h] := True;
h := AddItem('R2');
InsertItem(h,Null,'Cell 2.1');
InsertItem(h,Null,'Cell 2.2');
ExpandItem[h] := True;
end;
EndUpdate();
end
|
452
|
How can I get the caption of selected item
// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.Tree1SelectionChanged(ASender: TObject; );
begin
with Tree1 do
begin
with Items do
begin
OutputDebugString( 'Handle' );
OutputDebugString( SelectedItem[0] );
OutputDebugString( 'Caption' );
OutputDebugString( CellCaption[OleVariant(SelectedItem[0]),OleVariant(0)] );
end;
end
end;
with Tree1 do
begin
BeginUpdate();
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
Columns.Add('Items');
with Items do
begin
h := AddItem('R1');
InsertItem(h,Null,'Cell 1.1');
InsertItem(h,Null,'Cell 1.2');
ExpandItem[h] := True;
h := AddItem('R2');
InsertItem(h,Null,'Cell 2.1');
InsertItem(h,Null,'Cell 2.2');
ExpandItem[h] := True;
end;
EndUpdate();
end
|
451
|
Can I display the cell's check box after the text
![](images/extreeq451.png)
with Tree1 do
begin
with (IUnknown(Columns.Add('Column')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
Def[EXTREELib_TLB.exCellDrawPartsOrder] := 'caption,check';
end;
with Items do
begin
CellHasCheckBox[OleVariant(AddItem('Caption 1')),OleVariant(0)] := True;
CellHasCheckBox[OleVariant(AddItem('Caption 2')),OleVariant(0)] := True;
end;
end
|
450
|
Can I change the order of the parts in the cell, as checkbox after the text, and so on
![](images/extreeq450.png)
with Tree1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
(IUnknown(Columns.Add('Column')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellDrawPartsOrder] := 'caption,check,icon,icons,picture';
with Items do
begin
h := AddItem('Text');
CellImage[OleVariant(h),OleVariant(0)] := 1;
CellHasCheckBox[OleVariant(h),OleVariant(0)] := True;
end;
end
|
449
|
Can I have an image displayed after the text. Can I get that effect without using HTML content
![](images/extreeq449.png)
with Tree1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
(IUnknown(Columns.Add('Column')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exCellDrawPartsOrder] := 'caption,icon,check,icons,picture';
with Items do
begin
h := AddItem('Text');
CellImage[OleVariant(h),OleVariant(0)] := 1;
end;
end
|
448
|
Does your control support RightToLeft property for RTL languages or right to left
![](images/extreeq448.png)
with Tree1 do
begin
BeginUpdate();
ScrollBars := EXTREELib_TLB.exDisableBoth;
LinesAtRoot := EXTREELib_TLB.exLinesAtRoot;
with (IUnknown(Columns.Add('P1')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellHasCheckBox] := OleVariant(True);
PartialCheck := True;
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
ExpandItem[h] := True;
end;
RightToLeft := True;
EndUpdate();
end
|
447
|
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
![](images/extreeq447.png)
with Tree1 do
begin
BeginUpdate();
ScrollBars := EXTREELib_TLB.exDisableBoth;
with Columns do
begin
Add('C1');
Add('C2');
Add('C3');
Add('C4');
Add('C5');
Add('C6');
Add('C7');
Add('C8');
end;
RightToLeft := True;
EndUpdate();
end
|
446
|
How can I use the CASE statement (CASE usage)
![](images/extreeq446.png)
with Tree1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Value')) as EXTREELib_TLB.Column).Width := 24;
with (IUnknown(Columns.Add('CASE - statment')) as EXTREELib_TLB.Column) do
begin
ComputedField := '%0 case (default:''not found'';1:%0;2:2*%0;3:3*%0;4:4*%0;5:5*%0;7:''Seven'';8:''Eight'';9:''Nine'';11:''Eleven'';13:''Thirtheen'';14:''Fourth' +
'een'')';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(OleVariant(0));
AddItem(OleVariant(1));
AddItem(OleVariant(2));
end;
EndUpdate();
end
|
445
|
How can I use the CASE statement (CASE usage)
![](images/extreeq445.png)
with Tree1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Value')) as EXTREELib_TLB.Column).Width := 24;
with (IUnknown(Columns.Add('CASE - statment')) as EXTREELib_TLB.Column) do
begin
ComputedField := '%0 case (default:''not found'';1:''One'';2:''Two'';3:''Three'';4:''Four'';5:''Five'';7:''Seven'';8:''Eight'';9:''Nine'';11:''Eleven'';13:''Thirtheen''' +
';14:''Fourtheen'')';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(OleVariant(0));
AddItem(OleVariant(1));
AddItem(OleVariant(2));
end;
EndUpdate();
end
|
444
|
I have seen the IN function but it returns -1 or 0. How can I display the value being found ( SWITCH usage )
![](images/extreeq444.png)
with Tree1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Value')) as EXTREELib_TLB.Column).Width := 24;
with (IUnknown(Columns.Add('SWITCH - statment')) as EXTREELib_TLB.Column) do
begin
ComputedField := '%0 switch (''not found'', 1,2,3,4,5,7,8,9,11,13,14)';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(OleVariant(0));
AddItem(OleVariant(1));
AddItem(OleVariant(2));
end;
EndUpdate();
end
|
443
|
I have a large collection of constant values and using or operator is a time consuming (IN usage). Is there any way to increase the speed to check if a value maches the collection
![](images/extreeq443.png)
with Tree1 do
begin
BeginUpdate();
(IUnknown(Columns.Add('Value')) as EXTREELib_TLB.Column).Width := 24;
with (IUnknown(Columns.Add('IN - statment')) as EXTREELib_TLB.Column) do
begin
ComputedField := '%0 in (1,2,3,4,5,7,8,9,11,13,14) ? ''found'' : ''''';
ToolTip := ComputedField;
end;
with Items do
begin
AddItem(OleVariant(0));
AddItem(OleVariant(1));
AddItem(OleVariant(2));
end;
EndUpdate();
end
|
442
|
Is is possible to use HTML tags to display in the filter caption
![](images/extreeq442.png)
with Tree1 do
begin
BeginUpdate();
FilterBarPromptVisible := True;
FilterBarCaption := 'This is a bit of text being displayed in the filter bar.';
Columns.Add('');
with Items do
begin
AddItem('Item 1');
AddItem('Item 2');
AddItem('Item 3');
end;
EndUpdate();
end
|
441
|
How can I find the number of items after filtering
with Tree1 do
begin
BeginUpdate();
Columns.Add('');
with Items do
begin
h := AddItem('');
CellCaption[OleVariant(h),OleVariant(0)] := OleVariant(VisibleItemCount);
end;
EndUpdate();
end
|
440
|
How can I change the filter caption
![](images/extreeq440.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := Integer(EXTREELib_TLB.exFilterPromptWords) Or Integer(EXTREELib_TLB.exFilterPromptContainsAll);
FilterBarPromptPattern := 'london robert';
FilterBarCaption := '<r>Found: ... ';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
439
|
While using the filter prompt is it is possible to use wild characters
![](images/extreeq439.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptPattern;
FilterBarPromptPattern := 'lon* seat*';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
438
|
How can I list all items that contains any of specified words, not necessary at the beggining
![](images/extreeq438.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := Integer(EXTREELib_TLB.exFilterPromptStartWords) Or Integer(EXTREELib_TLB.exFilterPromptContainsAny);
FilterBarPromptPattern := 'london davolio';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
437
|
How can I list all items that contains any of specified words, not strings
![](images/extreeq437.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := Integer(EXTREELib_TLB.exFilterPromptWords) Or Integer(EXTREELib_TLB.exFilterPromptContainsAny);
FilterBarPromptPattern := 'london nancy';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
436
|
How can I list all items that contains all specified words, not strings
![](images/extreeq436.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := Integer(EXTREELib_TLB.exFilterPromptWords) Or Integer(EXTREELib_TLB.exFilterPromptContainsAll);
FilterBarPromptPattern := 'london robert';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
435
|
I've noticed that the filtering by prompt is not case sensitive, is is possible to make it case sensitive
![](images/extreeq435.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := Integer(EXTREELib_TLB.exFilterPromptCaseSensitive) Or Integer(EXTREELib_TLB.exFilterPromptContainsAny);
FilterBarPromptPattern := 'Anne';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
434
|
Is it possible to list only items that ends with any of specified strings
![](images/extreeq434.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptEndWith;
FilterBarPromptColumns := '0';
FilterBarPromptPattern := 'Fuller';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
433
|
Is it possible to list only items that ends with any of specified strings
![](images/extreeq433.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptEndWith;
FilterBarPromptColumns := '0';
FilterBarPromptPattern := 'Fuller';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
432
|
Is it possible to list only items that starts with any of specified strings
![](images/extreeq432.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptStartWith;
FilterBarPromptColumns := '0';
FilterBarPromptPattern := 'An M';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
431
|
Is it possible to list only items that starts with specified string
![](images/extreeq431.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptStartWith;
FilterBarPromptColumns := '0';
FilterBarPromptPattern := 'A';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
430
|
How can I specify that the list should include any of the seqeunces in the pattern
![](images/extreeq430.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptContainsAny;
FilterBarPromptPattern := 'london seattle';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
429
|
How can I specify that all sequences in the filter pattern must be included in the list
![](images/extreeq429.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptType := EXTREELib_TLB.exFilterPromptContainsAll;
FilterBarPromptPattern := 'london manager';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
428
|
How do I change at runtime the filter prompt
![](images/extreeq428.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptPattern := 'london manager';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
427
|
How do I specify to filter only a single column when using the filter prompt
![](images/extreeq427.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPromptColumns := '2,3';
FilterBarPromptPattern := 'london';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
426
|
How do I change the prompt or the caption being displayed in the filter bar
![](images/extreeq426.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
FilterBarPrompt := 'changed';
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
EndUpdate();
end
|
425
|
How do I enable the filter prompt feature
![](images/extreeq425.png)
with Tree1 do
begin
BeginUpdate();
ColumnAutoResize := True;
ContinueColumnScroll := False;
MarkSearchColumn := False;
SearchColumnIndex := 1;
FilterBarPromptVisible := True;
with Columns do
begin
(IUnknown(Add('Name')) as EXTREELib_TLB.Column).Width := 96;
(IUnknown(Add('Title')) as EXTREELib_TLB.Column).Width := 96;
Add('City');
end;
with Items do
begin
h0 := AddItem('Nancy Davolio');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Andrew Fuller');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Vice President, Sales';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Tacoma';
SelectItem[h0] := True;
h0 := AddItem('Janet Leverling');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Kirkland';
h0 := AddItem('Margaret Peacock');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Redmond';
h0 := AddItem('Steven Buchanan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Manager';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Michael Suyama');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Robert King');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
h0 := AddItem('Laura Callahan');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Inside Sales Coordinator';
CellCaption[OleVariant(h0),OleVariant(2)] := 'Seattle';
h0 := AddItem('Anne Dodsworth');
CellCaption[OleVariant(h0),OleVariant(1)] := 'Sales Representative';
CellCaption[OleVariant(h0),OleVariant(2)] := 'London';
end;
EndUpdate();
end
|
424
|
I have an EBN file how can I apply different colors to it, so no need to create a new one
![](images/extreeq424.png)
with Tree1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
SelBackColor := BackColor;
SelForeColor := ForeColor;
HasLines := EXTREELib_TLB.exNoLine;
Columns.Add('Default');
with Items do
begin
h := AddItem('Root');
hC := InsertItem(h,Null,'Default');
ItemBackColor[hC] := $1000000;
ItemHeight[InsertItem(h,Null,'')] := 6;
hC := InsertItem(h,Null,'Light Green');
ItemBackColor[hC] := $100ff00;
ItemHeight[InsertItem(h,Null,'')] := 6;
hC := InsertItem(h,Null,'Dark Green');
ItemBackColor[hC] := $1007f00;
ItemHeight[InsertItem(h,Null,'')] := 6;
hC := InsertItem(h,Null,'Magenta');
ItemBackColor[hC] := $1ff7fff;
ItemHeight[InsertItem(h,Null,'')] := 6;
hC := InsertItem(h,Null,'Yellow');
ItemBackColor[hC] := $17fffff;
ItemHeight[InsertItem(h,Null,'')] := 6;
ExpandItem[h] := True;
end;
end
|
423
|
How can I change the foreground color for a particular column
![](images/extreeq423.png)
with Tree1 do
begin
with Columns do
begin
Add('Column 1');
(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exHeaderForeColor] := OleVariant(8439039);
Add('Column 3');
end;
end
|
422
|
How can I change the background color for a particular column
![](images/extreeq422.png)
with Tree1 do
begin
with Columns do
begin
Add('Column 1');
(IUnknown(Add('Column 2')) as EXTREELib_TLB.Column).Def[EXTREELib_TLB.exHeaderBackColor] := OleVariant(8439039);
Add('Column 3');
end;
end
|
421
|
How can I display the column using currency format and enlarge the font for certain values
![](images/extreeq421.png)
with Tree1 do
begin
with (IUnknown(Columns.Add('Currency')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := 'len(value) ? ((0:=dbl(value)) < 10 ? ''<fgcolor=808080><font ;7>'' : ''<b>'') + currency(=:0)';
end;
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('9.94');
AddItem('11.94');
AddItem('1000');
end;
end
|
420
|
How can I highlight only parts of the cells
![](images/extreeq420.png)
with Tree1 do
begin
with (IUnknown(Columns.Add('')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := 'value replace ''hil'' with ''<fgcolor=FF0000><b>hil</b></fgcolor>''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
419
|
How can I get the number of occurrences of a specified string in the cell
![](images/extreeq419.png)
with Tree1 do
begin
Columns.Add('');
with (IUnknown(Columns.Add('occurrences')) as EXTREELib_TLB.Column) do
begin
ComputedField := 'lower(%0) count ''o''';
FormatColumn := '''contains '' + value + '' of \''o\'' chars''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1 oooof the root');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'Child 3');
ExpandItem[h] := True;
end;
end
|
418
|
How can I display dates in my format
![](images/extreeq418.png)
with Tree1 do
begin
with (IUnknown(Columns.Add('Date')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := '''<b>'' + year(0:=date(value)) + ''</b><fgcolor=808080><font ;6> ('' + month(=:0) + '' - '' + day(=:0) +'')''';
end;
with Items do
begin
AddItem('1/21/2001');
AddItem('2/22/2002');
AddItem('3/13/2003');
AddItem('4/24/2004');
end;
end
|
417
|
How can I display dates in short format
![](images/extreeq417.png)
with Tree1 do
begin
(IUnknown(Columns.Add('Date')) as EXTREELib_TLB.Column).FormatColumn := 'shortdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
416
|
How can I display dates in long format
![](images/extreeq416.png)
with Tree1 do
begin
(IUnknown(Columns.Add('Date')) as EXTREELib_TLB.Column).FormatColumn := 'longdate(value)';
with Items do
begin
AddItem('1/1/2001');
AddItem('2/2/2002');
AddItem('3/3/2003');
AddItem('4/4/2004');
end;
end
|
415
|
How can I display only the right part of the cell
![](images/extreeq415.png)
with Tree1 do
begin
Columns.Add('');
with (IUnknown(Columns.Add('Right')) as EXTREELib_TLB.Column) do
begin
ComputedField := '%0 right 2';
FormatColumn := '''"'' + value + ''"''';
end;
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'SChild 3');
ExpandItem[h] := True;
end;
end
|
414
|
How can I display only the left part of the cell
![](images/extreeq414.png)
with Tree1 do
begin
Columns.Add('');
(IUnknown(Columns.Add('Left')) as EXTREELib_TLB.Column).ComputedField := '%0 left 2';
with Items do
begin
h := AddItem('Root');
InsertItem(h,Null,'Child 1');
InsertItem(h,Null,'Child 2');
InsertItem(h,Null,'SChild 3');
ExpandItem[h] := True;
end;
end
|
413
|
How can I display true or false instead 0 and -1
![](images/extreeq413.png)
with Tree1 do
begin
(IUnknown(Columns.Add('Boolean')) as EXTREELib_TLB.Column).FormatColumn := 'value != 0 ? ''true'' : ''false''';
with Items do
begin
AddItem(OleVariant(True));
AddItem(OleVariant(False));
AddItem(OleVariant(True));
AddItem(OleVariant(0));
AddItem(OleVariant(1));
end;
end
|
412
|
How can I display icons or images instead numbers
![](images/extreeq412.png)
with Tree1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with (IUnknown(Columns.Add('Icons')) as EXTREELib_TLB.Column) do
begin
Def[EXTREELib_TLB.exCellCaptionFormat] := OleVariant(1);
FormatColumn := '''The cell displays the icon <img>''+value+''</img> instead '' + value';
end;
with Items do
begin
AddItem(OleVariant(1));
AddItem(OleVariant(2));
AddItem(OleVariant(3));
end;
end
|
411
|
How can I display the column using currency
![](images/extreeq411.png)
with Tree1 do
begin
(IUnknown(Columns.Add('Currency')) as EXTREELib_TLB.Column).FormatColumn := 'currency(dbl(value))';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
AddItem(OleVariant(5));
AddItem('10000.99');
end;
end
|
410
|
How can I display the currency only for not empty cells
![](images/extreeq410.png)
with Tree1 do
begin
Columns.Add('Number');
(IUnknown(Columns.Add('Currency')) as EXTREELib_TLB.Column).ComputedField := 'len(%0) ? currency(dbl(%0)) : ''''';
with Items do
begin
AddItem('1.23');
AddItem('2.34');
AddItem('0');
ItemBackColor[AddItem(Null)] := $8080ff;
AddItem('10000.99');
end;
end
|
409
|
Is there a function to display the number of days between two date including the number of hours
![](images/extreeq409.png)
with Tree1 do
begin
(IUnknown(Columns.Add('Start')) as EXTREELib_TLB.Column).Width := 32;
Columns.Add('End');
(IUnknown(Columns.Add('Duration')) as EXTREELib_TLB.Column).ComputedField := '2:=((1:=int(0:= date(%1)-date(%0))) = 0 ? '''' : str(=:1) + '' day(s)'') + ( 3:=round(24*(=:0-floor(=:0))) ? (len(=:2) ? '' and '' : ''' +
''') + =:3 + '' hour(s)'' : '''' )';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[OleVariant(h),OleVariant(1)] := '1/14/2001';
h := AddItem('2/22/2002 12:00:00 PM');
CellCaption[OleVariant(h),OleVariant(1)] := '3/14/2002 1:00:00 PM';
h := AddItem('3/13/2003');
CellCaption[OleVariant(h),OleVariant(1)] := '4/11/2003 11:00:00 AM';
end;
end
|
408
|
Is there a function to display the number of days between two date including the number of hours
![](images/extreeq408.png)
with Tree1 do
begin
Columns.Add('Start');
Columns.Add('End');
(IUnknown(Columns.Add('Duration')) as EXTREELib_TLB.Column).ComputedField := '"D " + int(date(%1)-date(%0)) + " H " + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[OleVariant(h),OleVariant(1)] := '1/14/2001 11:00:00 PM';
h := AddItem('2/22/2002 12:00:00 PM');
CellCaption[OleVariant(h),OleVariant(1)] := '3/14/2002 1:00:00 PM';
h := AddItem('3/13/2003');
CellCaption[OleVariant(h),OleVariant(1)] := '4/11/2003 11:00:00 AM';
end;
end
|
407
|
How can I display the number of days between two dates
![](images/extreeq407.png)
with Tree1 do
begin
Columns.Add('Start');
Columns.Add('End');
(IUnknown(Columns.Add('Duration')) as EXTREELib_TLB.Column).ComputedField := '(date(%1)-date(%0)) + '' days''';
with Items do
begin
h := AddItem('1/11/2001');
CellCaption[OleVariant(h),OleVariant(1)] := '1/14/2001';
h := AddItem('2/22/2002');
CellCaption[OleVariant(h),OleVariant(1)] := '3/14/2002';
h := AddItem('3/13/2003');
CellCaption[OleVariant(h),OleVariant(1)] := '4/11/2003';
end;
end
|
406
|
How can I get second part of the date
![](images/extreeq406.png)
with Tree1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Second')) as EXTREELib_TLB.Column).ComputedField := 'sec(date(%0))';
with Items do
begin
AddItem('1/11/2001 10:10:00 AM');
AddItem('2/22/2002 11:01:22 AM');
AddItem('3/13/2003 12:23:01 PM');
AddItem('4/14/2004 1:11:59 PM');
end;
end
|
405
|
How can I get minute part of the date
![](images/extreeq405.png)
with Tree1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Minute')) as EXTREELib_TLB.Column).ComputedField := 'min(date(%0))';
with Items do
begin
AddItem('1/11/2001 10:10:00 AM');
AddItem('2/22/2002 11:01:00 AM');
AddItem('3/13/2003 12:23:00 PM');
AddItem('4/14/2004 1:11:00 PM');
end;
end
|
404
|
How can I check the hour part only so I know it was afternoon
![](images/extreeq404.png)
with Tree1 do
begin
ConditionalFormats.Add('hour(%0)>=12',Null).Bold := True;
Columns.Add('Date');
(IUnknown(Columns.Add('Hour')) as EXTREELib_TLB.Column).ComputedField := 'hour(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
403
|
What about a function to get the day in the week, or days since Sunday
![](images/extreeq403.png)
with Tree1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('WeekDay')) as EXTREELib_TLB.Column).ComputedField := 'weekday(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
402
|
Is there any function to get the day of the year or number of days since January 1st
![](images/extreeq402.png)
with Tree1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Day since January 1st')) as EXTREELib_TLB.Column).ComputedField := 'yearday(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|
401
|
How can I display only the day of the date
![](images/extreeq401.png)
with Tree1 do
begin
Columns.Add('Date');
(IUnknown(Columns.Add('Day')) as EXTREELib_TLB.Column).ComputedField := 'day(%0)';
with Items do
begin
AddItem('1/11/2001 10:00:00 AM');
AddItem('2/22/2002 11:00:00 AM');
AddItem('3/13/2003 12:00:00 PM');
AddItem('4/14/2004 1:00:00 PM');
end;
end
|